import { EditColumns } from "@/api/interface/EditColumns";
import { SysUser } from "./data";
import { formInputEvents, formInputProps } from "@/components/FormCreate/interface/input";
import { formFieldRule } from "@/components/FormCreate/interface/fieldRule";
import fields = SysUser.Fields;
import { DeepClone } from "@/utils/deepClone";

//获取[创建表单]的formRules
//fapi文档：http://www.form-create.com/v3/instance.html
export const GetCreateFormRule = (cols: EditColumns): EditColumns => {
  //隐藏角色id字段
  cols.setHidden(fields.role_ids, true);
  cols.setDisplay(fields.creator, false);
  // cols.setValue(fields.status, 1);
  // return JSON.parse(JSON.stringify(cols));
  return DeepClone(cols);
};
